var mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');

var schema = new mongoose.Schema({
    cateId: mongoose.Schema.ObjectId,
    goodsname: String,
    price: String,
    total: Number,
    type: String,
    keyword: String,
    number: { type: Number,default:0},
    date: {
        type: Date,
        default: Date.now
    }
});
schema.plugin(mongoosePaginate);

module.exports = mongoose.model('Product', schema); // Model.paginate()